package com.isoft.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.core.io.ClassPathResource;

import java.io.File;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class MyMailMessage {
   private String from;
   private String[] to;
   private String subject;
   private String text;
   private String attachementFileName;

   //发送附件：文件使用绝对路径
    private File attachementFile;

    //发送附件：附件使用基于项目出发相对路径描述
    private ClassPathResource attachementSource;

    public void setTo(String...to){
        this.to=to;
    }
}
